home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / zmd6112b.zip / ZMDTEST.PAS < prev   
Pascal/Delphi Source File  |  1992-07-05  |  1KB  |  45 lines

  1. Uses Dos,Crt,FosCom,ZMD6;
  2. var
  3.       ich,ch : char;
  4.       tempstring : string;
  5.       doexit : boolean;
  6.       
  7. begin
  8.    doexit:=false;
  9.    clrscr;
  10.    ch:=#0;
  11.    Z_SRPort:=1;                    { Set the serial port }
  12.    Z_SRBaud:=2400;                 {         baud }
  13.    Z_ReceivePath:='\file\';        {         path for receiving files }
  14.    Fos_Parms(Z_SRPort,Z_SRBaud,8,'N',1);
  15.    Fos_Init(Z_SRPort);
  16.    repeat
  17.       while Fos_Avail(Z_SRPort) do begin
  18.          ich:=Fos_Receive(Z_SRPort);
  19.          Fos_Ansi(ich);
  20.       end;
  21.       if keypressed then begin
  22.          ch:=readkey;
  23.          if ch <> #0 then begin
  24.             Fos_Write(Z_SRPort,ch);
  25.          end else begin
  26.             ch:=readkey;
  27.             if ch=#19 {Alt-R} then begin
  28.                Z_GetFiles;      { Get those files }
  29.             end;
  30.             if ch=#31 {Alt-S} then begin
  31.                writeln;
  32.                write('File: ');
  33.                readln(tempstring);
  34.                Z_Files^[1].Name:=tempstring; { Set the file name }
  35.                Z_SendFiles(1);               { Send it }
  36.             end;
  37.             if ch=#45 {Alt-X} then begin
  38.                doexit:=true;                 { Adios pinheads }
  39.             end;
  40.          end;
  41.       end;
  42.    until doexit;
  43.    Fos_Close(Z_SRPort);
  44. end.
  45.